/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.erpnasajon.seguranca;

import org.springframework.dao.DataAccessException;
import org.springframework.security.authentication.encoding.PasswordEncoder;

/**
 *
 * @author RafaMend
 */
public class Encoder implements PasswordEncoder {

    @Override
    public String encodePassword(String string, Object o) throws DataAccessException {
        throw new UnsupportedOperationException("Not supported yet.");
        
    }

    @Override
    public boolean isPasswordValid(String string, String string1, Object o) throws DataAccessException {
        Criptografia cpto = new Criptografia();
        String senhaCodificada = cpto.Codificar(string1);
        return (string.equals(senhaCodificada));
    }
}
